package xjtu.sad.zbsj.dao.util;

import org.apache.ibatis.annotations.Update;
import xjtu.sad.zbsj.template.UserInfo;
import xjtu.sad.zbsj.util.FileDetail;
import xjtu.sad.zbsj.util.MarkDetail;
import xjtu.sad.zbsj.util.MarkInfo;
import xjtu.sad.zbsj.util.MenuItem;

import java.util.List;

public interface UtilDao {
    UserInfo getUserInfo(Integer userId);

    List<MenuItem> getMenuItemList(Integer roleId);

    List<MarkInfo> getMarkInfoList(Integer taskId);

    List<MarkDetail> getMarkDetailList(List<MarkInfo> markInfoList);

    @Update("update t_task set result_file_name = #{fileName} where task_id = #{taskId} ")
    void saveFileName(Integer taskId, String fileName);

    void insertFileInfo(List<FileDetail> fileList);

    void insertTaskContent(List<FileDetail> fileList);

    @Update("update t_task set task_content_count = #{size} where task_id =#{taskId}")
    void updateTaskContentCount(Integer taskId, int size);
}
